﻿<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <title>jQuery表单选择器示例</title>
        <script src="js/jquery-3.6.1.min.js"></script>
        <style>
            form {
                width: 500px;
                text-align: center;
            }
        </style>
    </head>
    <body>
        <h3>jQuery表单选择器示例</h3>
        <hr>
        <!--表单-->
        <form method="post" action="URL">
            <label>用户名：
                <input type="text" name="username" required />
            </label>
            <br />
            <label>密　码：
                <input type="password" name="pwd" required />
            </label>
            <br />
            <label>确　认：
                <input type="password" name="pwd" required />
            </label>
            <br />
            <label>姓　名：
                <input type="text" name="name" required />
            </label>
            <br />
            <label>邮　箱：
                <input type="email" name="email" required />
            </label>
            <br />
            <button type="submit">提交注册</button>
        </form>
        <script>
            $(document).ready(function() {
                $(":password").css("border", "1px solid red");
            });
        </script>
    </body>
</html>

